mixin datatable(titles)
    table(class="table table-hover table-bordered")
        thead
            tr
                each item in titles
                    td(class="text-center")!= item
        tbody
            if block
                block
            else
                p 没有提供任何内容。

mixin pagination(pager)
    nav.row
        div(id="page_total" class="col-md-2 col-sm-2" style="line-height: 79.6px;") 当前共#{pager.count}条记录
        div(class="col-md-8 col-sm-8 text-center")
            ul.pagination
                li(class=pager.pageNum == pager.firstNum ? "disabled" : "")
                    a(href=`${pager.href}?pageNum=${pager.firstNum}`)
                        span 首页
                li(class=pager.pageNum == pager.firstNum ? "disabled" : "")
                    a(href=`${pager.href}?pageNum=${pager.preNum}`)
                        span 上一页
                - let i = 0;
                while i < pager.total
                    - i++;
                    li(class=pager.pageNum == i ? "active" : "")
                        a(href=`${pager.href}?pageNum=${i}`)
                            span= i
                li(class=pager.pageNum == pager.lastNum ? "disabled" : "")
                    a(href=`${pager.href}?pageNum=${pager.nextNum}`)
                        span 下一页
                li(class=pager.pageNum == pager.lastNum ? "disabled" : "")
                    a(href=`${pager.href}?pageNum=${pager.lastNum}`)
                        span 尾页
        div(class="col-md-2 col-sm-2" style="margin: 20px 0")
            select#page_select.form-control(data-href=pager.href)
                each item in pager.options
                    option(value=item selected=pager.pageSize==item) #{item}
